{%- if grains.role in ['so-heavynode', 'so-receiver'] %}
  {%- set HOST = salt['grains.get']('host') %}
{%- else %}
  {%- set HOST = salt['grains.get']('master') %}
{%- endif %}
{%- set BATCH = salt['pillar.get']('logstash_settings:ls_pipeline_batch_size', 125) %}
output {
	redis {
		host => '{{ HOST }}'
		port => 6379
		data_type => 'list'
		key => 'logstash:unparsed'
		congestion_interval => 1
		congestion_threshold => 50000000
		batch => true
		batch_events => {{ BATCH }}
	}
}
